import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../components/Login.vue'
import PageHome from '../views/PageHome.vue'
import PlatformHome from '../components/platform/Home.vue'
import UserManage from '../components/platform/UserManage.vue'
import MenuManage from '../components/platform/MenuManage.vue'
import FinanceInfo from '../components/finance/FinanceInfo.vue'
import FinanceHome from '../components/finance/FinanceHome.vue'
import QueryTender from '../components/finance/QueryTender.vue'
import FinanceBill from '../components/finance/FinanceBill.vue'
import AuditRecord from '../components/platform/AuditRecord.vue'
import FinanceUserList from '../components/finance/FinanceUserList.vue'
import TendFull from '../components/platform/TendFull.vue'
import TendLog from '../components/platform/TendLog.vue'
import RecommendationList from '../components/platform/RecommendationList.vue'
import RecommendationRecord from '../components/platform/RecommendationRecord.vue'
import TenderPlatforAudit from '../components/platform/TenderPlatforAudit.vue'
import AddTender from '../components/finance/addTender.vue'
import TenderAuditRecord from  '../components/platform/TenderAuditRecord.vue'
import Pending from '../components/platform/Pending.vue'
import FinanceAsset from '../components/finance/FinanceAsset.vue'
import PlatformTenderList from  '../components/platform/PlatformTenderList.vue'
import PlatformFullAudit from '../components/platform/PlatformFullAudit.vue'


const CoreHome = () => import('../components/core/CoreHome.vue')
const Shop = () => import('../components/platform/Shop.vue')
const FinanceAudit = () => import('../components/platform/FinanceAudit.vue')
const Recommend = () => import('../components/core/Enterprise/Recommend.vue')
const CoreView = () => import('../components/core/Enterprise/CoreView.vue')
const Audit = () => import('../components/core/Enterprise/AuditRecord.vue')
const CheckCollateral = () => import('../components/core/CoreFinance/CheckCollateral')
const CoreCompensation = () => import('../components/core/CoreFinance/CoreCompensation')
const CheckCompensation = () => import('../components/core/CoreFinance/CheckCompensation')
const CoreRecourse = () => import('../components/core/CoreFinance/CoreRecourse')
const CheckRecourse = () => import('../components/core/CoreFinance/CheckRecourse')
Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'pageHome',
        component: PageHome
    }, {
        path: '/platformhome',
        name: 'platformhome',
        component: PlatformHome,
        children: [
            {
                path:'/platformFullAudit',
                name:'platformFullAudit',
               component:PlatformFullAudit,
           },
            {
                path:'/patformTenderList',
                name:'platformTenderList',
               component:PlatformTenderList,
           },
            {
                path: '/usermanage',
                name: 'usermanage',
                component: UserManage,
            },
            {
                path: '/menumanage',
                name: 'menumanage',
                component: MenuManage,
            }
            ,
            {
                path: '/shop',
                name: 'shop',
                component: Shop,
            }
            ,
            {
                path: '/financeAudit',
                name: 'financeAudit',
                component: FinanceAudit,
            },
            {
                path: '/auditRecord',
                name: 'auditRecord',
                component: AuditRecord,
            },
            {
                path:'/tenderAuditRecord',
                name:'tenderAuditRecord ',
               component:TenderAuditRecord ,
           },

            {
              path:'/tendfull',
              name:'tendfull',
             component:TendFull,
            },
            {
                path:'/pending',
                name:'pending',
               component:Pending,
              },
            {
              path:'/tendlog',
              name:'tendlog',
             component:TendLog,
            },
            {
                path: '/recommendationList',
                name: 'recommendationList',
                component: RecommendationList,
            },
            {
              path: '/tenderPlatforAudit',
              name: 'tenderPlatforAudit',
              component: TenderPlatforAudit
            },
            {
                path: '/recommendationRecord',
                name: 'recommendationRecord',
                component: RecommendationRecord
              },
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/financeHome',
        name: 'financeHome',
        component: FinanceHome,
        children: [
            {
                path: '/', redirect: '/financeInfo'
            },
            {
                path: '/financeInfo',
                name: 'financeInfo',
                component: FinanceInfo
            },
            {
                path: '/queryTender',
                name: 'queryTender',
                component: QueryTender
            },
            {
                path: '/financeBill',
                name: 'financeBill',
                component: FinanceBill
            },
            {
                path: '/financeUserList',
                name: 'financeUserList',
                component: FinanceUserList
            },
    {
      path:'/recommendationList',
      name:'recommendationList',
     component:RecommendationList,
    },
    
    
  ]
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  {
    path:'/financeHome',
    name:'financeHome',
   component:FinanceHome,
   children:[
    {
        path: '/financeAsset',
        name: 'financeAsset',
        component: FinanceAsset
    },
    {
        path:'/',redirect:'/financeInfo'
    },
    {
      path: '/financeInfo',
      name: 'financeInfo',
      component: FinanceInfo
    },
    {
      path: '/queryTender',
      name: 'queryTender',
      component: QueryTender
    },
    {
      path: '/financeBill',
      name: 'financeBill',
      component: FinanceBill
    },
    {
      path: '/addTender',
      name: 'addTender',
      component: AddTender
    },


        ]
    },
    {
        path: '/coreHome',
        name: 'coreHome',
        component: CoreHome,
        children: [
            {
                path: '/recommend',
                name: 'recommend',
                component: Recommend,
            },
            {
                path: '/coreView',
                name: 'coreView',
                component: CoreView,
            },
            {
                path: '/audit',
                name: 'audit',
                component: Audit,
            },
            {
                path: '/checkCollateral',
                name: 'checkCollateral',
                component: CheckCollateral
            },
            {
                path: '/coreCompensation',
                name: 'coreCompensation',
                component: CoreCompensation,
            }, {
                path: '/checkCompensation',
                name: 'checkCompensation',
                component: CheckCompensation,
            }, {
                path: '/coreRecourse',
                name: 'coreRecourse',
                component: CoreRecourse,
            }, {
                path: '/checkRecourse',
                name: 'checkRecourse',
                component: CheckRecourse,
            },
        ]
    }


]

const router = new VueRouter({
    routes
})

export default router
